﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ParamDisplay.aspx.cs" enableEventValidation="false"
Inherits="ZLCMS.Web.Example.ParamDisplay" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
            
    <div>
    <div>
        <asp:Button ID="Button1" runat="server" Text="读取参数" onclick="Button1_Click" />&nbsp;
        <asp:Button ID="Button2" runat="server" Text="刷新全部参数" onclick="Button2_Click" />&nbsp;
        当前有效参数为：[<asp:Label ID="Label1" runat="server"></asp:Label>]
    </div>
    <hr />
    
    <div>
        待刷新的参数组：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>&nbsp;
        <asp:Button ID="Button3" runat="server" Text="刷新参数组" onclick="Button3_Click" />
    </div>
    <hr />
    
    <div>
        翻译示例-1，简单的翻译参数应用<br />
        参数组：<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>，
        参数代码：<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>&nbsp;
        <asp:Button ID="Button4" runat="server" Text="执行翻译" onclick="Button4_Click" />
        <br />
        翻译结果：[<asp:Label ID="Label2" runat="server"></asp:Label>]
    </div>
    <hr />
    
    <div>
        翻译示例-2，高级的翻译参数应用<br />
        参数组：<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>，
        参数代码：<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>，
        扩展代码：<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>，
        缺省返回：<asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>&nbsp;
        <asp:Button ID="Button5" runat="server" Text="执行翻译" onclick="Button5_Click" />
        <br />
        翻译结果：[<asp:Label ID="Label3" runat="server"></asp:Label>]
    </div>
    <hr />
    
    <div>
        列表示例-1，获取完整参数列表<br />
        参数组：<asp:TextBox ID="TextBox8" runat="server"></asp:TextBox>&nbsp;
        <asp:Button ID="Button6" runat="server" Text="获取" onclick="Button6_Click" /><br />
        <asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
            代码：[<%# Eval("Key") %>]，值：[<%# Eval("Value") %>] <br />
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <hr />
    
    <div>
        列表示例-2，获取联动效果的参数列表<br />
        参数组：<asp:TextBox ID="TextBox9" runat="server"></asp:TextBox><br />
        过滤代码-1：<asp:TextBox ID="TextBox10" runat="server"></asp:TextBox>&nbsp;
        过滤值-1：<asp:TextBox ID="TextBox11" runat="server"></asp:TextBox><br />
        过滤代码-2：<asp:TextBox ID="TextBox12" runat="server"></asp:TextBox>&nbsp;
        过滤值-2：<asp:TextBox ID="TextBox13" runat="server"></asp:TextBox>&nbsp;
        <asp:Button ID="Button7" runat="server" Text="获取" onclick="Button7_Click" /><br />
        <asp:Repeater ID="Repeater2" runat="server">
            <ItemTemplate>
            代码：[<%# Eval("Key") %>]，值：[<%# Eval("Value") %>] <br />
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <hr />
    
    <div>
        列表示例-3，获取高级的联动效果的参数列表<br />
        参数组：<asp:TextBox ID="TextBox14" runat="server"></asp:TextBox>&nbsp;
        扩展代码：<asp:TextBox ID="TextBox19" runat="server"></asp:TextBox><br />
        过滤代码-1：<asp:TextBox ID="TextBox15" runat="server"></asp:TextBox>&nbsp;
        过滤值-1：<asp:TextBox ID="TextBox16" runat="server"></asp:TextBox><br />
        过滤代码-2：<asp:TextBox ID="TextBox17" runat="server"></asp:TextBox>&nbsp;
        过滤值-2：<asp:TextBox ID="TextBox18" runat="server"></asp:TextBox>&nbsp;
        <asp:Button ID="Button8" runat="server" Text="获取" onclick="Button8_Click" /><br />
        <asp:Repeater ID="Repeater3" runat="server">
            <ItemTemplate>
            代码：[<%# Eval("Key") %>]，值：[<%# Eval("Value") %>] <br />
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <hr />
    
    <div>
        控件联动效果，使用 ASP.NET AJAX。<br />
        规定：<br />
        1.Category ：保存参数的组代码和过滤参数的JSON结构，使用 %?% 符号作为参数占位符。<br />
          如：{"Group":"City","FilterList":[{"Code":"Province","Value":"%?%"}]}<br />
        2.PromptText 和 PromptValue ：默认为 "--请选择--" 和 "-1"<br />
        3.EmptyValue 和 EmptyText ：默认为 "--无--" 和 "-2"<br />
        注意：<br />
        1.须加上 ：&lt;asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"&gt;
        <br />
        2.须加上 ：&lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp"&gt;<br />
        <asp:DropDownList ID="DropDownList1" runat="server" Width="150px">
        </asp:DropDownList>
        <asp:DropDownList ID="DropDownList2" runat="server" Width="150px">
        </asp:DropDownList>
        
        <asp:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="DropDownList1" Category='{"Group":"Province"}'
            ServicePath="~\AJAXServer\Param\ParamAJAXServer.asmx" ServiceMethod="GetValueList" PromptText="--请选择--" PromptValue="-1" 
            LoadingText="读取中..." EmptyValue="-2" EmptyText="--无--">
        </asp:CascadingDropDown>
        <asp:CascadingDropDown ID="CascadingDropDown2" runat="server" TargetControlID="DropDownList2" Category='{"Group":"City","FilterList":[{"Code":"Province","Value":"%?%"}]}'
            ServicePath="~\AJAXServer\Param\ParamAJAXServer.asmx" ServiceMethod="GetValueList" ParentControlID="DropDownList1" PromptText="--请选择--" PromptValue="-1" 
            LoadingText="读取中..." EmptyValue="-2" EmptyText="--无--">
        </asp:CascadingDropDown>
    </div>
    <hr />
    
    <div>
    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatColumns="5">
        </asp:RadioButtonList>
    </div>
    <hr />
    
    <div>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatColumns="5">
        </asp:CheckBoxList>
    </div>
    <hr />
        
    
    </div>
    </form>
</body>
</html>
